/*
 * @Description: 
 * @Date: 2021-09-03 15:25:22
 * @Author: 刘元峰
 * @LastEditTime: 2021-09-03 15:52:05
 * @LastEditors: 刘元峰
 * @FilePath: \flutter_demo_list\lib\pages\protocol\test.dart
 */

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class TestPage extends StatelessWidget {
  TestPage({Key? key}) : super(key: key);
  final TestPageController vm = Get.put(TestPageController());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: 1.sw,
        height: 1.sh,
        color: Colors.white,
        child: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              // const Text(
              //   'Text:这是一个简单的文本组件',
              //   style: TextStyle(
              //     color: Colors.black,
              //     fontSize: 14.0,
              //     fontWeight: FontWeight.normal,
              //   ),
              // ),
              RichText(
                text: TextSpan(style: const TextStyle(), children: [
                  TextSpan(
                      text: '这是一个链接',
                      style: const TextStyle(
                        fontSize: 20.0,
                        color: Colors.red,
                      ),
                      recognizer: TapGestureRecognizer()
                        ..onTap = () {
                          Get.toNamed<void>('/testPage');
                        })
                ]),
              )
            ],
          ),
        ),
      ),
    );
  }
}

class TestPageController extends GetxController {}
